<div class="row"> 
<small>
<div class="span2 bs-docs-sidebar ">
 	<*include file="<*$controller*>/location.tpl"*>
  </div>
<div class="span10">
   <div class="table_content">
		<div class="ta_top"></div>
		<div class="ta_in">
   <*if $result|@count neq 0*>  
   <table cellpadding="0" cellspacing="0" class="table">
		<tr> 
			<th  class="span2" >&nbsp;</th>
            <th  class="span2">宝贝名称</th>
			<th  class="span2">订购时间</th>
            <th  class="span1">数量</th> 
            <th  class="span1">总价</th> 
			<th  class="span3">所属机构</th> 
            <th  class="span2">校园</th>
            <th  class="span2">班级</th> 
            <th  class="span2">学生</th>
            <th  class="span3">操作</th>
			<th>&nbsp;</th>
		</tr>
      
    <*foreach from=$result item=a key =key name=foo*>
		<tr> 
             
			<td > <div class="span2"><img class="img-rounded" src="http://cloud.yunxiaoche.com/shop/<*$a.filename*>.jpg.small.jpg"     /></div></td>
            <td><*$a.goodsname|truncate:15*></td> 
			<td><*$a.addtime|date_format:"%Y-%m-%d %H:%M:%S"*></td>
            <td><*$a.buynum*></td>
            <td><*$a.buynum*$a.price*></td>
            <*eval var=$a.student_uid assign="stu_uid"*>
			<td><*$grouplist.$stu_uid.groupname*></td>  
            <td><*$grouplist.$stu_uid.schoolname*></td>  
            <td><*$grouplist.$stu_uid.classname*></td> 
            <td><*$a.cnname*></td>   
            <td>
            <a   role="button" class="btn btn-primary"   onclick="javascript:confirmorder(<*$a.orderid*>,<*$pageNum*>)"><i class="icon-pencil icon-white"></i> 确认</a> 
          <button type="button" class="btn " onclick="javascript:deleteit(<*$a.orderid*>,<*$pageNum*>)" ><i class="icon-trash"></i>作废</button> 
            </td>
            <td>&nbsp;</td>
		</tr>
		<*/foreach*>
       <tr>
        	<td colspan="8"><*$page*></td>
            <td>&nbsp;</td>
        </tr>
      <*else*>  
          <tr>
        	<td colspan="8"> 没有您要的结果,请改变你的搜索条件！</td>
            <td>&nbsp;</td>
        </tr> 
        
        <*/if*>
        </table>
        </div>
    <div class="ta_bottom"></div>
	  </div>  
</div>
</small>
</div>

<script type="text/javascript"> 
function confirmorder(id,pageNum)
{ 
 	window.location='/<*$controller*>/confirmorder/id/'+id+'/pageNum/'+pageNum;
}
function deleteit(id,type)
{
  if(confirm("删除将不能恢复")){
   window.location='/<*$controller*>/delete/id/'+id+'/pageNum/'+type;
   }
}

</script>